package com.huawei.appgallery.search.ui.card;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseCardBean;
import o.cgz;
import o.chy;
import o.cuv.b;
import o.eqx;
import o.evx;

public class SearchBannerCard extends cgz {
    private TextView ˊ;
    private ImageView ˋ;
    private View ˎ;
    private TextView ˏ;
    private View ॱ;

    public SearchBannerCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        view.findViewById(b.ᐝॱ).setVisibility(8);
        this.ˏ = (TextView) view.findViewById(b.ʾ);
        this.ˋ = (ImageView) view.findViewById(b.ˊˊ);
        this.ॱ = view.findViewById(b.ॱˎ);
        this.ˎ = view.findViewById(b.ˏॱ);
        this.ˊ = (TextView) view.findViewById(b.ꜟ);
        ʽ(view);
        return this;
    }

    public void ˎ(BaseCardBean baseCardBean) {
        super.ˎ(baseCardBean);
        if (baseCardBean != null) {
            this.ˏ.setText(baseCardBean.v_());
            eqx.ˏ(this.ˋ, baseCardBean.ॱˌ(), "image_default_icon");
            ˋ(this.ˊ, baseCardBean.ˋʻ());
        }
        if (ˊᐝ()) {
            this.ॱ.setVisibility(0);
        } else {
            this.ॱ.setVisibility(8);
        }
    }

    public void ॱ(final chy o_chy) {
        if (this.ˎ != null) {
            this.ˎ.setOnClickListener(new evx(this) {
                final /* synthetic */ SearchBannerCard ॱ;

                public void ˋ(View view) {
                    if (o_chy != null) {
                        o_chy.ˏ(this.ॱ.ˋᐝ(), this.ॱ);
                    }
                }
            });
        }
    }

    public boolean ˊᐝ() {
        if (this.ˊᐝ == null || this.ˊᐝ.ॱㆍ()) {
            return false;
        }
        return true;
    }
}
